package org.backend.repository;

import org.backend.mapper.MessageMapper;
import org.backend.pojo.entity.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class MessageRepository {

    @Autowired
    private MessageMapper messageMapper;

    public List<Message> getHistoryMessageByOpenid(String openid) {
        return messageMapper.getHistoryMessageByOpenid(openid);
    }

    public int addMessage(Message message) {
        return messageMapper.addMessage(message);
    }
}
